package com.learn.factory;

public class build2 {
    public static void main(String[] args) {
        Human white = HumanFactory2.createHuman(WhiteHuman.class);
        white.getColor();
        white.talk();

        Human black = HumanFactory2.createHuman(BlackHuman.class);
        black.getColor();
        black.talk();

        Human yellow = HumanFactory2.createHuman(YellowHuman.class);
        yellow.getColor();
        yellow.talk();
    }
}
